package com.haircut.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.haircut.base.Result;
import com.haircut.mapper.WechatUser;
import com.haircut.model.dto.UserDTO;
import com.haircut.model.dto.UserListDto;
import com.haircut.model.page.PageParam;
import com.haircut.model.req.RemarkReq;
import com.haircut.security.model.SysUserDetails;
import com.haircut.security.model.WxLoginRequest;
import com.haircut.security.model.WxLoginResult;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.List;

public interface WechatUserService extends IService<WechatUser> {
    // 微信登录
    WxLoginResult loginByWechat(String mobile, String wxOpenid);

    Result<String> register(String phone);

    // 修改用户角色
    boolean updateUserType(Long userId, String userType);

    WechatUser createNewUser(String wxOpenid, String mobile);

    WechatUser getByOpenid(String wxOpenid);

    UserDetails loadUserByWxOpenid(String mobile, String wxOpenid);

    WechatUser getByPhone(String phone);

    Result<UserListDto> userList(PageParam page);

    Result<UserDTO> singleUser(String phone);


    void updateUserInfo(Long userId, String avatarUrl, String nickName);

    Result<String> addRemark(RemarkReq req);
}